package com.maple.common.widget.wheel

/**
 * Tip:
 * Create by SeVen on 2024/3/29 10:34
 */
interface OnScrollListener {
    /**
     * Callback invoked while the number picker scroll state has changed.
     *
     * @param view The view whose scroll state is being reported.
     * @param scrollState The current scroll state. One of
     * [.SCROLL_STATE_IDLE],
     * [.SCROLL_STATE_TOUCH_SCROLL] or
     * [.SCROLL_STATE_IDLE].
     */
    fun onScrollStateChange(view: WheelView, scrollState: Int)

    companion object {

        /**
         * The view is not scrolling.
         */
        const val SCROLL_STATE_IDLE = 0

        /**
         * The user is scrolling using touch, and his finger is still on the screen.
         */
        const val SCROLL_STATE_TOUCH_SCROLL = 1

        /**
         * The user had previously been scrolling using touch and performed a fling.
         */
        const val SCROLL_STATE_FLING = 2
    }
}